<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>百草视后台管理</title>
    <link href="css/adminLogin.css" rel="stylesheet">
    <script src="js/jquery.js"></script>
    <script>
        function login() {
            $.ajax({
                url: "administrator/login",
                data: {
                    "username": $("#username").val(),
                    "password": $("#password").val(),
                },
                type: "POST",
                success: function (result) {
                    if (result.code == 200 && result.data) {
                        alert("登陆成功")
                        location.href = "adminNavigation.html"
                    } else {
                        alert(result.message)
                    }

                }
            });
            return false;
        }
    </script>
</head>

<body>
    <div class="shell">

        <iframe src="" frameborder="0" name="stop"></iframe>

        <div class="container a-container" id="a-container">

            <form method="post" class="form" id="b-form" onsubmit="return login()">
                <h2 class="form_title title">登录账号</h2>
                <p><input type="text" class="form_input" placeholder="Username" name="username" id="username"></p>
                <p><input type="password" class="form_input" placeholder="Password" name="password" id="password"></p>
                <div>
                    <input type="submit" class="switch_button button" value="登 录">
                    <input type="reset" class="switch_button button" value="重 置">
                </div>
            </form>

        </div>

        <div class="switch" id="switch-cnt">
            <div class="switch_circle"></div>
            <div class="switch_circle switch_circle-t"></div>

            <div class="switch_container ">
                <h2 class="switch_title title" style="letter-spacing: 0;">百草视后台管理</h2>
            </div>
        </div>
    </div>

</body>

</html>